import {request} from "../request-config.js"
import {setToken} from "@/utils/token";

export function loginAPI(data){
    return request({
        url:"/hems/user/login",
        method:"post",
        headers:{
            'Content-type': 'application/x-www-form-urlencoded'
        },
        data
    }).then(res=>{
        const token = res.data.data
        setToken(token)
        console.log(token)
        return res.data
        return res
    })
}

